{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="{% static '/js/jquery-1.9.1.min.js' %}"></script>
</head>
<body>
<h1>欢迎{{ request.session.name }}</h1>
<form action="" method="post">
    <input type="text" name="ss">
    <button>">擦寻</button>
</form>
<table>

    {% for ss in ss %}
        <tr>
            <td>{{ forloop.counter }}</td>
            <td>{{ ss.sname }}</td>
            <td>{{ ss.age }}</td>
            <td>{{ ss.da|date:'Y-m-d' }}</td>
            <td>{% if ss.ns == 1 %}
                男
            {% else %}
                女
            {% endif %} </td>
            <td>{{ ss.gjz }}</td>
            <td>{{ ss.fenlei }}</td>
        </tr>
    {% endfor %}

</table>
<table>
<tr><td><a href="{% url 'add' %}">增加</a></td></tr>
    {% for all in alls %}
        <tr>
            <td>{{ forloop.counter }}</td>
            <td>{{ all.sname }}</td>
            <td>{{ all.age }}</td>
            <td>{{ all.da|date:'Y-m-d' }}</td>
            <td>{% if all.ns == 1 %}
                男
            {% else %}
                女
            {% endif %} </td>
            <td>{{ all.gjz }}</td>
            <td>{{ all.fenlei }}</td>
            <td><a href="{% url 'delete' id=all.id %}" onclick="return a()">删除</a></td>
            <td><a href="{% url 'update' id=all.id %}">修改</a></td>
        </tr>
    {% endfor %}

</table>
<script>
    function a() {
        if (confirm('确定要删除吗')){
            return true
        }else {
            return false
        }
    }
</script>
</body>
</html>